/**
 * this class represents a pair of elements.
 **/
public class Pair<T, U> {
  T first;
  U second;

  public Pair(T first, U second) {
    this.first = first;
    this.second = second;
  }

  /**
   * returns the first element of this pair
   * @return T the first element
   **/
  public T getFirst() {
    return this.first;
  }

  /**
   * returns the second element of this pair
   * @return U the second element
   **/
  public U getSecond() {
    return this.second;
  }
}
